﻿using System.ComponentModel.DataAnnotations;

namespace BMS.Entity
{
    /// <summary>
    /// 审计字段
    /// </summary>
    /// <typeparam name="T">主键类型</typeparam>
    public class AuditField<T>
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 创建人ID
        /// </summary>
        public string? CreateUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        //[Column(TypeName ="datetime2 default getdate()")]
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更新人ID
        /// </summary>
        public string? UpdateUserId { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 逻辑删除字段，为false表示正常显示，为true正常删除
        /// </summary>
        //[Column(TypeName ="bit default 0")]
        public bool IsDeleted { get; set; } = false;
    }
}